package me.xiaoyan.java.spring.service;

import me.xiaoyan.java.spring.dao.LinkDao;
import me.xiaoyan.java.spring.po.Link;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LinkServiceImpl implements LinkService {
    private LinkDao linkDao;

    @Autowired
    public void setLinkDao(LinkDao linkDao) {
        this.linkDao = linkDao;
    }

    @Override
    public void save(Link link) {
        linkDao.save(link);
    }

    @Override
    public List<Link> findList(int count) {
        return linkDao.findList(count);
    }

    @Override
    public Link getLinkById(Integer id) {
        return linkDao.findById(id);
    }
}
